package com.yj.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.yj.dao.CourseDao;
import com.yj.model.Course;

@Repository("courseDao")
public class CourseDaoImpl extends BaseDaoImpl<Course> implements CourseDao {


	@SuppressWarnings("unchecked")
	@Override
	public List<Course> getCourseByType(String type) {
		String hql = "from Course where type=:type";
		return getSession().createQuery(hql).setParameter("type", type).list();
	}

}
